package com.qf.jvm;

import org.openjdk.jol.info.ClassLayout;

/**
 * 对象指针压缩
 * @author Thor
 * @公众号 Java架构栈
 */
public class ObjectLengthAnalyze {

    public static void main(String[] args) {
        ClassLayout classLayout = ClassLayout.parseInstance(new A());
        System.out.println(classLayout.toPrintable());
    }

    static class A{
        int num;
        String name;
    }
}
